package com.yzt.zhuju.file;

import android.os.Environment;

import com.yzt.zhuju.config.AppConfig;

import java.io.File;

/**
 * author : bob
 * date   : 2022/11/30
 * desc   :
 */
public class FileManager {

    private static final String ROOT_PATH = getFileRootPath() + File.separator + "Nomi";

    //表情背景路径
    private static final String SINGLE_EMOIJ_PATH = ROOT_PATH + File.separator + "Uploads" + File.separator + "expression";

    public static String getSingleEmoijPath(){
        return SINGLE_EMOIJ_PATH;
    }

    public static String getDefaultPath(){
        return ROOT_PATH;
    }

    private static String getFileRootPath() {

        File fileRootDir = AppConfig.application.getExternalFilesDir(Environment.DIRECTORY_PICTURES);
        if (fileRootDir != null) {
            return fileRootDir.getAbsolutePath();
        } else {
            return Environment.getExternalStorageDirectory().getAbsolutePath();
        }
    }
}
